package com.fary.config;

import com.fary.component.Student;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

/**
 * @author Fary
 * @version 1.0
 * @description: TODO
 * @date 2021/11/12 9:23
 */

/**
 * 加了@Configuration后的配置类会由cglib动态代理。
 */
//@Import({AnnotationConfig1.class})
@ComponentScan("com.fary.component")
@Configuration
public class AnnotationConfig {

    @Bean
    public Student getStudent() {
        return new Student();
    }

}
